package com.finance.cooperate.feature.reader;

import com.finance.cooperate.feature.base.ReaderImpl;
import com.finance.cooperate.feature.core.feature.FeatureDefinition;
import com.finance.cooperate.feature.dto.PersonalDTO;

import java.util.Map;

/**
 * @ClassName PersonalReader
 * @Description 个人信息抽取
 * @Author shen
 * @Date 2022/5/26 22:44
 * @Modify ...
 */
public class PersonalReader extends ReaderImpl {
    @Override
    public Map<String, String> read(String userId) {

        PersonalDTO info = personalService.getInfo(userId);

        super.put(FeatureDefinition.f_personal_marital_status, info.getMaritalStatus());

        super.put(FeatureDefinition.f_personal_highest_school_record, info.getHighestSchoolRecord());

        super.put(FeatureDefinition.f_personal_residential_detail_address_len, info.getResidentialDetailAddressLen());

        super.put(FeatureDefinition.f_personal_residential_type, info.getResidentialType());

        return super.getResult();
    }
}
